#[macro_export]
macro_rules! app_error {
    ($msg:expr) => {
        $crate::error::AppError::new($msg)
    };
    ($code:expr, $msg:expr) => {
        $crate::error::AppError::with_code($code, $msg)
    };
    ($code:expr, $fmt:expr, $($arg:tt)*) => {
        $crate::error::AppError::with_code($code, format!($fmt, $($arg)*))
    };
}
